3.1203 \(\int (a+b \tan (e+f x))^3 (c+d \tan (e+f x))^3 \, dx\)

Optimal. Leaf size=302 \[ \frac{d \left (3 a^2 b \left (c^2-d^2\right )+2 a^3 c d-6 a b^2 c d-b^3 \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{(a d+b c) \left (a^2 \left (-\left (3 c^2-d^2\right )\right )+8 a b c d+b^2 \left (c^2-3 d^2\right )\right ) \log (\cos (e+f x))}{f}-x (a c-b d) \left (a^2 \left (-\left (c^2-3 d^2\right )\right )+8 a b c d+b^2 \left (3 c^2-d^2\right )\right )+\frac{b \left (3 a^2-b^2\right ) (c+d \tan (e+f x))^3}{3 f}+\frac{\left (3 a^2 b c+a^3 d-3 a b^2 d-b^3 c\right ) (c+d \tan (e+f x))^2}{2 f}-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{20 d^2 f}+\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f} \]

[Out]

-((a*c - b*d)*(8*a*b*c*d - a^2*(c^2 - 3*d^2) + b^2*(3*c^2 - d^2))*x) + ((b*c + a*d)*(8*a*b*c*d + b^2*(c^2 - 3*
d^2) - a^2*(3*c^2 - d^2))*Log[Cos[e + f*x]])/f + (d*(2*a^3*c*d - 6*a*b^2*c*d + 3*a^2*b*(c^2 - d^2) - b^3*(c^2
- d^2))*Tan[e + f*x])/f + ((3*a^2*b*c - b^3*c + a^3*d - 3*a*b^2*d)*(c + d*Tan[e + f*x])^2)/(2*f) + (b*(3*a^2 -
 b^2)*(c + d*Tan[e + f*x])^3)/(3*f) - (b^2*(b*c - 11*a*d)*(c + d*Tan[e + f*x])^4)/(20*d^2*f) + (b^2*(a + b*Tan
[e + f*x])*(c + d*Tan[e + f*x])^4)/(5*d*f)

________________________________________________________________________________________

Rubi [A]  time = 0.512408, antiderivative size = 302, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 25, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3566, 3630, 3528, 3525, 3475} \[ \frac{d \left (3 a^2 b \left (c^2-d^2\right )+2 a^3 c d-6 a b^2 c d-b^3 \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{(a d+b c) \left (a^2 \left (-\left (3 c^2-d^2\right )\right )+8 a b c d+b^2 \left (c^2-3 d^2\right )\right ) \log (\cos (e+f x))}{f}-x (a c-b d) \left (a^2 \left (-\left (c^2-3 d^2\right )\right )+8 a b c d+b^2 \left (3 c^2-d^2\right )\right )+\frac{b \left (3 a^2-b^2\right ) (c+d \tan (e+f x))^3}{3 f}+\frac{\left (3 a^2 b c+a^3 d-3 a b^2 d-b^3 c\right ) (c+d \tan (e+f x))^2}{2 f}-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{20 d^2 f}+\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Tan[e + f*x])^3*(c + d*Tan[e + f*x])^3,x]

[Out]

-((a*c - b*d)*(8*a*b*c*d - a^2*(c^2 - 3*d^2) + b^2*(3*c^2 - d^2))*x) + ((b*c + a*d)*(8*a*b*c*d + b^2*(c^2 - 3*
d^2) - a^2*(3*c^2 - d^2))*Log[Cos[e + f*x]])/f + (d*(2*a^3*c*d - 6*a*b^2*c*d + 3*a^2*b*(c^2 - d^2) - b^3*(c^2
- d^2))*Tan[e + f*x])/f + ((3*a^2*b*c - b^3*c + a^3*d - 3*a*b^2*d)*(c + d*Tan[e + f*x])^2)/(2*f) + (b*(3*a^2 -
 b^2)*(c + d*Tan[e + f*x])^3)/(3*f) - (b^2*(b*c - 11*a*d)*(c + d*Tan[e + f*x])^4)/(20*d^2*f) + (b^2*(a + b*Tan
[e + f*x])*(c + d*Tan[e + f*x])^4)/(5*d*f)

Rule 3566

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si
mp[(b^2*(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^(n + 1))/(d*f*(m + n - 1)), x] + Dist[1/(d*(m + n -
1)), Int[(a + b*Tan[e + f*x])^(m - 3)*(c + d*Tan[e + f*x])^n*Simp[a^3*d*(m + n - 1) - b^2*(b*c*(m - 2) + a*d*(
1 + n)) + b*d*(m + n - 1)*(3*a^2 - b^2)*Tan[e + f*x] - b^2*(b*c*(m - 2) - a*d*(3*m + 2*n - 4))*Tan[e + f*x]^2,
 x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
&& IntegerQ[2*m] && GtQ[m, 2] && (GeQ[n, -1] || IntegerQ[m]) &&  !(IGtQ[n, 2] && ( !IntegerQ[m] || (EqQ[c, 0]
&& NeQ[a, 0])))

Rule 3630

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[(C*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)), x] + Int[(a + b*Tan[e + f*x])
^m*Simp[A - C + B*Tan[e + f*x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && NeQ[A*b^2 - a*b*B + a^2*C, 0]
&&  !LeQ[m, -1]

Rule 3528

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(d
*(a + b*Tan[e + f*x])^m)/(f*m), x] + Int[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x
], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]

Rule 3525

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(a*c - b
*d)*x, x] + (Dist[b*c + a*d, Int[Tan[e + f*x], x], x] + Simp[(b*d*Tan[e + f*x])/f, x]) /; FreeQ[{a, b, c, d, e
, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int (a+b \tan (e+f x))^3 (c+d \tan (e+f x))^3 \, dx &=\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f}+\frac{\int (c+d \tan (e+f x))^3 \left (5 a^3 d-b^2 (b c+4 a d)+5 b \left (3 a^2-b^2\right ) d \tan (e+f x)-b^2 (b c-11 a d) \tan ^2(e+f x)\right ) \, dx}{5 d}\\ &=-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{20 d^2 f}+\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f}+\frac{\int (c+d \tan (e+f x))^3 \left (5 a \left (a^2-3 b^2\right ) d+5 b \left (3 a^2-b^2\right ) d \tan (e+f x)\right ) \, dx}{5 d}\\ &=\frac{b \left (3 a^2-b^2\right ) (c+d \tan (e+f x))^3}{3 f}-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{20 d^2 f}+\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f}+\frac{\int (c+d \tan (e+f x))^2 \left (5 d \left (a^3 c-3 a b^2 c-3 a^2 b d+b^3 d\right )+5 d \left (3 a^2 b c-b^3 c+a^3 d-3 a b^2 d\right ) \tan (e+f x)\right ) \, dx}{5 d}\\ &=\frac{\left (3 a^2 b c-b^3 c+a^3 d-3 a b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{b \left (3 a^2-b^2\right ) (c+d \tan (e+f x))^3}{3 f}-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{20 d^2 f}+\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f}+\frac{\int (c+d \tan (e+f x)) \left (-5 d \left (6 a^2 b c d-2 b^3 c d-a^3 \left (c^2-d^2\right )+3 a b^2 \left (c^2-d^2\right )\right )+5 d \left (2 a^3 c d-6 a b^2 c d+3 a^2 b \left (c^2-d^2\right )-b^3 \left (c^2-d^2\right )\right ) \tan (e+f x)\right ) \, dx}{5 d}\\ &=-(a c-b d) \left (8 a b c d-a^2 \left (c^2-3 d^2\right )+b^2 \left (3 c^2-d^2\right )\right ) x+\frac{d \left (2 a^3 c d-6 a b^2 c d+3 a^2 b \left (c^2-d^2\right )-b^3 \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{\left (3 a^2 b c-b^3 c+a^3 d-3 a b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{b \left (3 a^2-b^2\right ) (c+d \tan (e+f x))^3}{3 f}-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{20 d^2 f}+\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f}+\frac{\left (-5 d^2 \left (6 a^2 b c d-2 b^3 c d-a^3 \left (c^2-d^2\right )+3 a b^2 \left (c^2-d^2\right )\right )+5 c d \left (2 a^3 c d-6 a b^2 c d+3 a^2 b \left (c^2-d^2\right )-b^3 \left (c^2-d^2\right )\right )\right ) \int \tan (e+f x) \, dx}{5 d}\\ &=-(a c-b d) \left (8 a b c d-a^2 \left (c^2-3 d^2\right )+b^2 \left (3 c^2-d^2\right )\right ) x-\frac{(b c+a d) \left (3 a^2 c^2-b^2 c^2-8 a b c d-a^2 d^2+3 b^2 d^2\right ) \log (\cos (e+f x))}{f}+\frac{d \left (2 a^3 c d-6 a b^2 c d+3 a^2 b \left (c^2-d^2\right )-b^3 \left (c^2-d^2\right )\right ) \tan (e+f x)}{f}+\frac{\left (3 a^2 b c-b^3 c+a^3 d-3 a b^2 d\right ) (c+d \tan (e+f x))^2}{2 f}+\frac{b \left (3 a^2-b^2\right ) (c+d \tan (e+f x))^3}{3 f}-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{20 d^2 f}+\frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f}\\ \end{align*}

Mathematica [C]  time = 6.44128, size = 299, normalized size = 0.99 \[ \frac{b^2 (a+b \tan (e+f x)) (c+d \tan (e+f x))^4}{5 d f}+\frac{-\frac{b^2 (b c-11 a d) (c+d \tan (e+f x))^4}{4 d f}-\frac{5 \left (b \left (3 a^2-b^2\right ) \left (-6 d^2 \left (6 c^2-d^2\right ) \tan (e+f x)-12 c d^3 \tan ^2(e+f x)-3 i (c-i d)^4 \log (\tan (e+f x)+i)+3 i (c+i d)^4 \log (-\tan (e+f x)+i)-2 d^4 \tan ^3(e+f x)\right )+3 \left (3 a^2 b c+a^3 (-d)+3 a b^2 d-b^3 c\right ) \left (6 c d^2 \tan (e+f x)+(-d+i c)^3 \log (-\tan (e+f x)+i)-(d+i c)^3 \log (\tan (e+f x)+i)+d^3 \tan ^2(e+f x)\right )\right )}{6 f}}{5 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Tan[e + f*x])^3*(c + d*Tan[e + f*x])^3,x]

[Out]

(b^2*(a + b*Tan[e + f*x])*(c + d*Tan[e + f*x])^4)/(5*d*f) + (-(b^2*(b*c - 11*a*d)*(c + d*Tan[e + f*x])^4)/(4*d
*f) - (5*(3*(3*a^2*b*c - b^3*c - a^3*d + 3*a*b^2*d)*((I*c - d)^3*Log[I - Tan[e + f*x]] - (I*c + d)^3*Log[I + T
an[e + f*x]] + 6*c*d^2*Tan[e + f*x] + d^3*Tan[e + f*x]^2) + b*(3*a^2 - b^2)*((3*I)*(c + I*d)^4*Log[I - Tan[e +
 f*x]] - (3*I)*(c - I*d)^4*Log[I + Tan[e + f*x]] - 6*d^2*(6*c^2 - d^2)*Tan[e + f*x] - 12*c*d^3*Tan[e + f*x]^2
- 2*d^4*Tan[e + f*x]^3)))/(6*f))/(5*d)

________________________________________________________________________________________

Maple [B]  time = 0.007, size = 720, normalized size = 2.4 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x)

[Out]

1/2/f*a^3*tan(f*x+e)^2*d^3-1/2/f*a^3*ln(1+tan(f*x+e)^2)*d^3+1/f*a^3*arctan(tan(f*x+e))*c^3+1/2/f*tan(f*x+e)^2*
b^3*c^3-1/3/f*tan(f*x+e)^3*b^3*d^3+1/5/f*b^3*d^3*tan(f*x+e)^5-1/2/f*ln(1+tan(f*x+e)^2)*b^3*c^3-1/f*arctan(tan(
f*x+e))*b^3*d^3+1/f*b^3*d^3*tan(f*x+e)+9/f*arctan(tan(f*x+e))*a*b^2*c*d^2+9/f*a^2*b*c^2*d*tan(f*x+e)+9/2/f*tan
(f*x+e)^2*a^2*b*c*d^2+9/2/f*tan(f*x+e)^2*a*b^2*c^2*d-9/f*a*b^2*c*d^2*tan(f*x+e)-9/2/f*ln(1+tan(f*x+e)^2)*a^2*b
*c*d^2-9/2/f*ln(1+tan(f*x+e)^2)*a*b^2*c^2*d+3/f*tan(f*x+e)^3*a*b^2*c*d^2-9/f*arctan(tan(f*x+e))*a^2*b*c^2*d+3/
2/f*ln(1+tan(f*x+e)^2)*a^2*b*c^3+3/2/f*ln(1+tan(f*x+e)^2)*a*b^2*d^3+3/2/f*ln(1+tan(f*x+e)^2)*b^3*c*d^2-3/f*arc
tan(tan(f*x+e))*a*b^2*c^3-3/2/f*tan(f*x+e)^2*b^3*c*d^2+1/f*tan(f*x+e)^3*b^3*c^2*d+3/4/f*tan(f*x+e)^4*a*b^2*d^3
+3/4/f*tan(f*x+e)^4*b^3*c*d^2+3/f*arctan(tan(f*x+e))*a^2*b*d^3+3/f*a*b^2*c^3*tan(f*x+e)+1/f*tan(f*x+e)^3*a^2*b
*d^3-3/f*a^2*b*d^3*tan(f*x+e)+3/f*arctan(tan(f*x+e))*b^3*c^2*d-3/f*b^3*c^2*d*tan(f*x+e)-3/2/f*tan(f*x+e)^2*a*b
^2*d^3-3/f*a^3*arctan(tan(f*x+e))*c*d^2+3/f*a^3*tan(f*x+e)*c*d^2+3/2/f*a^3*ln(1+tan(f*x+e)^2)*c^2*d

________________________________________________________________________________________

Maxima [A]  time = 1.73811, size = 506, normalized size = 1.68 \begin{align*} \frac{12 \, b^{3} d^{3} \tan \left (f x + e\right )^{5} + 45 \,{\left (b^{3} c d^{2} + a b^{2} d^{3}\right )} \tan \left (f x + e\right )^{4} + 20 \,{\left (3 \, b^{3} c^{2} d + 9 \, a b^{2} c d^{2} +{\left (3 \, a^{2} b - b^{3}\right )} d^{3}\right )} \tan \left (f x + e\right )^{3} + 30 \,{\left (b^{3} c^{3} + 9 \, a b^{2} c^{2} d + 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c d^{2} +{\left (a^{3} - 3 \, a b^{2}\right )} d^{3}\right )} \tan \left (f x + e\right )^{2} + 60 \,{\left ({\left (a^{3} - 3 \, a b^{2}\right )} c^{3} - 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c^{2} d - 3 \,{\left (a^{3} - 3 \, a b^{2}\right )} c d^{2} +{\left (3 \, a^{2} b - b^{3}\right )} d^{3}\right )}{\left (f x + e\right )} + 30 \,{\left ({\left (3 \, a^{2} b - b^{3}\right )} c^{3} + 3 \,{\left (a^{3} - 3 \, a b^{2}\right )} c^{2} d - 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c d^{2} -{\left (a^{3} - 3 \, a b^{2}\right )} d^{3}\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right ) + 60 \,{\left (3 \, a b^{2} c^{3} + 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c^{2} d + 3 \,{\left (a^{3} - 3 \, a b^{2}\right )} c d^{2} -{\left (3 \, a^{2} b - b^{3}\right )} d^{3}\right )} \tan \left (f x + e\right )}{60 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x, algorithm="maxima")

[Out]

1/60*(12*b^3*d^3*tan(f*x + e)^5 + 45*(b^3*c*d^2 + a*b^2*d^3)*tan(f*x + e)^4 + 20*(3*b^3*c^2*d + 9*a*b^2*c*d^2
+ (3*a^2*b - b^3)*d^3)*tan(f*x + e)^3 + 30*(b^3*c^3 + 9*a*b^2*c^2*d + 3*(3*a^2*b - b^3)*c*d^2 + (a^3 - 3*a*b^2
)*d^3)*tan(f*x + e)^2 + 60*((a^3 - 3*a*b^2)*c^3 - 3*(3*a^2*b - b^3)*c^2*d - 3*(a^3 - 3*a*b^2)*c*d^2 + (3*a^2*b
 - b^3)*d^3)*(f*x + e) + 30*((3*a^2*b - b^3)*c^3 + 3*(a^3 - 3*a*b^2)*c^2*d - 3*(3*a^2*b - b^3)*c*d^2 - (a^3 -
3*a*b^2)*d^3)*log(tan(f*x + e)^2 + 1) + 60*(3*a*b^2*c^3 + 3*(3*a^2*b - b^3)*c^2*d + 3*(a^3 - 3*a*b^2)*c*d^2 -
(3*a^2*b - b^3)*d^3)*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.53283, size = 791, normalized size = 2.62 \begin{align*} \frac{12 \, b^{3} d^{3} \tan \left (f x + e\right )^{5} + 45 \,{\left (b^{3} c d^{2} + a b^{2} d^{3}\right )} \tan \left (f x + e\right )^{4} + 20 \,{\left (3 \, b^{3} c^{2} d + 9 \, a b^{2} c d^{2} +{\left (3 \, a^{2} b - b^{3}\right )} d^{3}\right )} \tan \left (f x + e\right )^{3} + 60 \,{\left ({\left (a^{3} - 3 \, a b^{2}\right )} c^{3} - 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c^{2} d - 3 \,{\left (a^{3} - 3 \, a b^{2}\right )} c d^{2} +{\left (3 \, a^{2} b - b^{3}\right )} d^{3}\right )} f x + 30 \,{\left (b^{3} c^{3} + 9 \, a b^{2} c^{2} d + 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c d^{2} +{\left (a^{3} - 3 \, a b^{2}\right )} d^{3}\right )} \tan \left (f x + e\right )^{2} - 30 \,{\left ({\left (3 \, a^{2} b - b^{3}\right )} c^{3} + 3 \,{\left (a^{3} - 3 \, a b^{2}\right )} c^{2} d - 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c d^{2} -{\left (a^{3} - 3 \, a b^{2}\right )} d^{3}\right )} \log \left (\frac{1}{\tan \left (f x + e\right )^{2} + 1}\right ) + 60 \,{\left (3 \, a b^{2} c^{3} + 3 \,{\left (3 \, a^{2} b - b^{3}\right )} c^{2} d + 3 \,{\left (a^{3} - 3 \, a b^{2}\right )} c d^{2} -{\left (3 \, a^{2} b - b^{3}\right )} d^{3}\right )} \tan \left (f x + e\right )}{60 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x, algorithm="fricas")

[Out]

1/60*(12*b^3*d^3*tan(f*x + e)^5 + 45*(b^3*c*d^2 + a*b^2*d^3)*tan(f*x + e)^4 + 20*(3*b^3*c^2*d + 9*a*b^2*c*d^2
+ (3*a^2*b - b^3)*d^3)*tan(f*x + e)^3 + 60*((a^3 - 3*a*b^2)*c^3 - 3*(3*a^2*b - b^3)*c^2*d - 3*(a^3 - 3*a*b^2)*
c*d^2 + (3*a^2*b - b^3)*d^3)*f*x + 30*(b^3*c^3 + 9*a*b^2*c^2*d + 3*(3*a^2*b - b^3)*c*d^2 + (a^3 - 3*a*b^2)*d^3
)*tan(f*x + e)^2 - 30*((3*a^2*b - b^3)*c^3 + 3*(a^3 - 3*a*b^2)*c^2*d - 3*(3*a^2*b - b^3)*c*d^2 - (a^3 - 3*a*b^
2)*d^3)*log(1/(tan(f*x + e)^2 + 1)) + 60*(3*a*b^2*c^3 + 3*(3*a^2*b - b^3)*c^2*d + 3*(a^3 - 3*a*b^2)*c*d^2 - (3
*a^2*b - b^3)*d^3)*tan(f*x + e))/f

________________________________________________________________________________________

Sympy [A]  time = 1.65621, size = 711, normalized size = 2.35 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))**3*(c+d*tan(f*x+e))**3,x)

[Out]

Piecewise((a**3*c**3*x + 3*a**3*c**2*d*log(tan(e + f*x)**2 + 1)/(2*f) - 3*a**3*c*d**2*x + 3*a**3*c*d**2*tan(e
+ f*x)/f - a**3*d**3*log(tan(e + f*x)**2 + 1)/(2*f) + a**3*d**3*tan(e + f*x)**2/(2*f) + 3*a**2*b*c**3*log(tan(
e + f*x)**2 + 1)/(2*f) - 9*a**2*b*c**2*d*x + 9*a**2*b*c**2*d*tan(e + f*x)/f - 9*a**2*b*c*d**2*log(tan(e + f*x)
**2 + 1)/(2*f) + 9*a**2*b*c*d**2*tan(e + f*x)**2/(2*f) + 3*a**2*b*d**3*x + a**2*b*d**3*tan(e + f*x)**3/f - 3*a
**2*b*d**3*tan(e + f*x)/f - 3*a*b**2*c**3*x + 3*a*b**2*c**3*tan(e + f*x)/f - 9*a*b**2*c**2*d*log(tan(e + f*x)*
*2 + 1)/(2*f) + 9*a*b**2*c**2*d*tan(e + f*x)**2/(2*f) + 9*a*b**2*c*d**2*x + 3*a*b**2*c*d**2*tan(e + f*x)**3/f
- 9*a*b**2*c*d**2*tan(e + f*x)/f + 3*a*b**2*d**3*log(tan(e + f*x)**2 + 1)/(2*f) + 3*a*b**2*d**3*tan(e + f*x)**
4/(4*f) - 3*a*b**2*d**3*tan(e + f*x)**2/(2*f) - b**3*c**3*log(tan(e + f*x)**2 + 1)/(2*f) + b**3*c**3*tan(e + f
*x)**2/(2*f) + 3*b**3*c**2*d*x + b**3*c**2*d*tan(e + f*x)**3/f - 3*b**3*c**2*d*tan(e + f*x)/f + 3*b**3*c*d**2*
log(tan(e + f*x)**2 + 1)/(2*f) + 3*b**3*c*d**2*tan(e + f*x)**4/(4*f) - 3*b**3*c*d**2*tan(e + f*x)**2/(2*f) - b
**3*d**3*x + b**3*d**3*tan(e + f*x)**5/(5*f) - b**3*d**3*tan(e + f*x)**3/(3*f) + b**3*d**3*tan(e + f*x)/f, Ne(
f, 0)), (x*(a + b*tan(e))**3*(c + d*tan(e))**3, True))

________________________________________________________________________________________

Giac [B]  time = 14.858, size = 11173, normalized size = 37. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*tan(f*x+e))^3*(c+d*tan(f*x+e))^3,x, algorithm="giac")

[Out]

1/60*(60*a^3*c^3*f*x*tan(f*x)^5*tan(e)^5 - 180*a*b^2*c^3*f*x*tan(f*x)^5*tan(e)^5 - 540*a^2*b*c^2*d*f*x*tan(f*x
)^5*tan(e)^5 + 180*b^3*c^2*d*f*x*tan(f*x)^5*tan(e)^5 - 180*a^3*c*d^2*f*x*tan(f*x)^5*tan(e)^5 + 540*a*b^2*c*d^2
*f*x*tan(f*x)^5*tan(e)^5 + 180*a^2*b*d^3*f*x*tan(f*x)^5*tan(e)^5 - 60*b^3*d^3*f*x*tan(f*x)^5*tan(e)^5 - 90*a^2
*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*
tan(f*x)*tan(e) + 1))*tan(f*x)^5*tan(e)^5 + 30*b^3*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^
3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^5*tan(e)^5 - 90*a^3*c^2*d*log(4
*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan
(e) + 1))*tan(f*x)^5*tan(e)^5 + 270*a*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e
) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^5*tan(e)^5 + 270*a^2*b*c*d^2*log(4*(ta
n(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e)
+ 1))*tan(f*x)^5*tan(e)^5 - 90*b^3*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan
(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^5*tan(e)^5 + 30*a^3*d^3*log(4*(tan(e)^2 + 1)/
(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*
x)^5*tan(e)^5 - 90*a*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(
e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^5*tan(e)^5 - 300*a^3*c^3*f*x*tan(f*x)^4*tan(e)^4 + 900*a*
b^2*c^3*f*x*tan(f*x)^4*tan(e)^4 + 2700*a^2*b*c^2*d*f*x*tan(f*x)^4*tan(e)^4 - 900*b^3*c^2*d*f*x*tan(f*x)^4*tan(
e)^4 + 900*a^3*c*d^2*f*x*tan(f*x)^4*tan(e)^4 - 2700*a*b^2*c*d^2*f*x*tan(f*x)^4*tan(e)^4 - 900*a^2*b*d^3*f*x*ta
n(f*x)^4*tan(e)^4 + 300*b^3*d^3*f*x*tan(f*x)^4*tan(e)^4 + 30*b^3*c^3*tan(f*x)^5*tan(e)^5 + 270*a*b^2*c^2*d*tan
(f*x)^5*tan(e)^5 + 270*a^2*b*c*d^2*tan(f*x)^5*tan(e)^5 - 135*b^3*c*d^2*tan(f*x)^5*tan(e)^5 + 30*a^3*d^3*tan(f*
x)^5*tan(e)^5 - 135*a*b^2*d^3*tan(f*x)^5*tan(e)^5 + 450*a^2*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 -
2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 150*b^3
*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*ta
n(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 450*a^3*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)
^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 1350*a*b^2*c^2*d*
log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x
)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 - 1350*a^2*b*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3
*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 450*b^3*c*d^2*log(4
*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan
(e) + 1))*tan(f*x)^4*tan(e)^4 - 150*a^3*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) +
tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^4*tan(e)^4 + 450*a*b^2*d^3*log(4*(tan(e)^2
 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*
tan(f*x)^4*tan(e)^4 - 180*a*b^2*c^3*tan(f*x)^5*tan(e)^4 - 540*a^2*b*c^2*d*tan(f*x)^5*tan(e)^4 + 180*b^3*c^2*d*
tan(f*x)^5*tan(e)^4 - 180*a^3*c*d^2*tan(f*x)^5*tan(e)^4 + 540*a*b^2*c*d^2*tan(f*x)^5*tan(e)^4 + 180*a^2*b*d^3*
tan(f*x)^5*tan(e)^4 - 60*b^3*d^3*tan(f*x)^5*tan(e)^4 - 180*a*b^2*c^3*tan(f*x)^4*tan(e)^5 - 540*a^2*b*c^2*d*tan
(f*x)^4*tan(e)^5 + 180*b^3*c^2*d*tan(f*x)^4*tan(e)^5 - 180*a^3*c*d^2*tan(f*x)^4*tan(e)^5 + 540*a*b^2*c*d^2*tan
(f*x)^4*tan(e)^5 + 180*a^2*b*d^3*tan(f*x)^4*tan(e)^5 - 60*b^3*d^3*tan(f*x)^4*tan(e)^5 + 600*a^3*c^3*f*x*tan(f*
x)^3*tan(e)^3 - 1800*a*b^2*c^3*f*x*tan(f*x)^3*tan(e)^3 - 5400*a^2*b*c^2*d*f*x*tan(f*x)^3*tan(e)^3 + 1800*b^3*c
^2*d*f*x*tan(f*x)^3*tan(e)^3 - 1800*a^3*c*d^2*f*x*tan(f*x)^3*tan(e)^3 + 5400*a*b^2*c*d^2*f*x*tan(f*x)^3*tan(e)
^3 + 1800*a^2*b*d^3*f*x*tan(f*x)^3*tan(e)^3 - 600*b^3*d^3*f*x*tan(f*x)^3*tan(e)^3 + 30*b^3*c^3*tan(f*x)^5*tan(
e)^3 + 270*a*b^2*c^2*d*tan(f*x)^5*tan(e)^3 + 270*a^2*b*c*d^2*tan(f*x)^5*tan(e)^3 - 90*b^3*c*d^2*tan(f*x)^5*tan
(e)^3 + 30*a^3*d^3*tan(f*x)^5*tan(e)^3 - 90*a*b^2*d^3*tan(f*x)^5*tan(e)^3 - 90*b^3*c^3*tan(f*x)^4*tan(e)^4 - 8
10*a*b^2*c^2*d*tan(f*x)^4*tan(e)^4 - 810*a^2*b*c*d^2*tan(f*x)^4*tan(e)^4 + 495*b^3*c*d^2*tan(f*x)^4*tan(e)^4 -
 90*a^3*d^3*tan(f*x)^4*tan(e)^4 + 495*a*b^2*d^3*tan(f*x)^4*tan(e)^4 + 30*b^3*c^3*tan(f*x)^3*tan(e)^5 + 270*a*b
^2*c^2*d*tan(f*x)^3*tan(e)^5 + 270*a^2*b*c*d^2*tan(f*x)^3*tan(e)^5 - 90*b^3*c*d^2*tan(f*x)^3*tan(e)^5 + 30*a^3
*d^3*tan(f*x)^3*tan(e)^5 - 90*a*b^2*d^3*tan(f*x)^3*tan(e)^5 - 60*b^3*c^2*d*tan(f*x)^5*tan(e)^2 - 180*a*b^2*c*d
^2*tan(f*x)^5*tan(e)^2 - 60*a^2*b*d^3*tan(f*x)^5*tan(e)^2 + 20*b^3*d^3*tan(f*x)^5*tan(e)^2 - 900*a^2*b*c^3*log
(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*t
an(e) + 1))*tan(f*x)^3*tan(e)^3 + 300*b^3*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e)
+ tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 - 900*a^3*c^2*d*log(4*(tan(e)
^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)
)*tan(f*x)^3*tan(e)^3 + 2700*a*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan
(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 2700*a^2*b*c*d^2*log(4*(tan(e)^2
 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*
tan(f*x)^3*tan(e)^3 - 900*b^3*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)
^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 300*a^3*d^3*log(4*(tan(e)^2 + 1)/(tan
(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3
*tan(e)^3 - 900*a*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^
2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^3*tan(e)^3 + 720*a*b^2*c^3*tan(f*x)^4*tan(e)^3 + 2160*a^2*b*
c^2*d*tan(f*x)^4*tan(e)^3 - 900*b^3*c^2*d*tan(f*x)^4*tan(e)^3 + 720*a^3*c*d^2*tan(f*x)^4*tan(e)^3 - 2700*a*b^2
*c*d^2*tan(f*x)^4*tan(e)^3 - 900*a^2*b*d^3*tan(f*x)^4*tan(e)^3 + 300*b^3*d^3*tan(f*x)^4*tan(e)^3 + 720*a*b^2*c
^3*tan(f*x)^3*tan(e)^4 + 2160*a^2*b*c^2*d*tan(f*x)^3*tan(e)^4 - 900*b^3*c^2*d*tan(f*x)^3*tan(e)^4 + 720*a^3*c*
d^2*tan(f*x)^3*tan(e)^4 - 2700*a*b^2*c*d^2*tan(f*x)^3*tan(e)^4 - 900*a^2*b*d^3*tan(f*x)^3*tan(e)^4 + 300*b^3*d
^3*tan(f*x)^3*tan(e)^4 - 60*b^3*c^2*d*tan(f*x)^2*tan(e)^5 - 180*a*b^2*c*d^2*tan(f*x)^2*tan(e)^5 - 60*a^2*b*d^3
*tan(f*x)^2*tan(e)^5 + 20*b^3*d^3*tan(f*x)^2*tan(e)^5 + 45*b^3*c*d^2*tan(f*x)^5*tan(e) + 45*a*b^2*d^3*tan(f*x)
^5*tan(e) - 600*a^3*c^3*f*x*tan(f*x)^2*tan(e)^2 + 1800*a*b^2*c^3*f*x*tan(f*x)^2*tan(e)^2 + 5400*a^2*b*c^2*d*f*
x*tan(f*x)^2*tan(e)^2 - 1800*b^3*c^2*d*f*x*tan(f*x)^2*tan(e)^2 + 1800*a^3*c*d^2*f*x*tan(f*x)^2*tan(e)^2 - 5400
*a*b^2*c*d^2*f*x*tan(f*x)^2*tan(e)^2 - 1800*a^2*b*d^3*f*x*tan(f*x)^2*tan(e)^2 + 600*b^3*d^3*f*x*tan(f*x)^2*tan
(e)^2 - 90*b^3*c^3*tan(f*x)^4*tan(e)^2 - 810*a*b^2*c^2*d*tan(f*x)^4*tan(e)^2 - 810*a^2*b*c*d^2*tan(f*x)^4*tan(
e)^2 + 450*b^3*c*d^2*tan(f*x)^4*tan(e)^2 - 90*a^3*d^3*tan(f*x)^4*tan(e)^2 + 450*a*b^2*d^3*tan(f*x)^4*tan(e)^2
+ 120*b^3*c^3*tan(f*x)^3*tan(e)^3 + 1080*a*b^2*c^2*d*tan(f*x)^3*tan(e)^3 + 1080*a^2*b*c*d^2*tan(f*x)^3*tan(e)^
3 - 540*b^3*c*d^2*tan(f*x)^3*tan(e)^3 + 120*a^3*d^3*tan(f*x)^3*tan(e)^3 - 540*a*b^2*d^3*tan(f*x)^3*tan(e)^3 -
90*b^3*c^3*tan(f*x)^2*tan(e)^4 - 810*a*b^2*c^2*d*tan(f*x)^2*tan(e)^4 - 810*a^2*b*c*d^2*tan(f*x)^2*tan(e)^4 + 4
50*b^3*c*d^2*tan(f*x)^2*tan(e)^4 - 90*a^3*d^3*tan(f*x)^2*tan(e)^4 + 450*a*b^2*d^3*tan(f*x)^2*tan(e)^4 + 45*b^3
*c*d^2*tan(f*x)*tan(e)^5 + 45*a*b^2*d^3*tan(f*x)*tan(e)^5 - 12*b^3*d^3*tan(f*x)^5 + 120*b^3*c^2*d*tan(f*x)^4*t
an(e) + 360*a*b^2*c*d^2*tan(f*x)^4*tan(e) + 120*a^2*b*d^3*tan(f*x)^4*tan(e) - 100*b^3*d^3*tan(f*x)^4*tan(e) +
900*a^2*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)
^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 300*b^3*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*t
an(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 900*a^3*c^
2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan
(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 2700*a*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*
x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 2700*a^2*b*c*d^
2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f
*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 + 900*b^3*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*
tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 300*a^3*d^3*log(4*(t
an(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e)
 + 1))*tan(f*x)^2*tan(e)^2 + 900*a*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + t
an(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)^2*tan(e)^2 - 1080*a*b^2*c^3*tan(f*x)^3*tan(
e)^2 - 3240*a^2*b*c^2*d*tan(f*x)^3*tan(e)^2 + 1440*b^3*c^2*d*tan(f*x)^3*tan(e)^2 - 1080*a^3*c*d^2*tan(f*x)^3*t
an(e)^2 + 4320*a*b^2*c*d^2*tan(f*x)^3*tan(e)^2 + 1440*a^2*b*d^3*tan(f*x)^3*tan(e)^2 - 600*b^3*d^3*tan(f*x)^3*t
an(e)^2 - 1080*a*b^2*c^3*tan(f*x)^2*tan(e)^3 - 3240*a^2*b*c^2*d*tan(f*x)^2*tan(e)^3 + 1440*b^3*c^2*d*tan(f*x)^
2*tan(e)^3 - 1080*a^3*c*d^2*tan(f*x)^2*tan(e)^3 + 4320*a*b^2*c*d^2*tan(f*x)^2*tan(e)^3 + 1440*a^2*b*d^3*tan(f*
x)^2*tan(e)^3 - 600*b^3*d^3*tan(f*x)^2*tan(e)^3 + 120*b^3*c^2*d*tan(f*x)*tan(e)^4 + 360*a*b^2*c*d^2*tan(f*x)*t
an(e)^4 + 120*a^2*b*d^3*tan(f*x)*tan(e)^4 - 100*b^3*d^3*tan(f*x)*tan(e)^4 - 12*b^3*d^3*tan(e)^5 - 45*b^3*c*d^2
*tan(f*x)^4 - 45*a*b^2*d^3*tan(f*x)^4 + 300*a^3*c^3*f*x*tan(f*x)*tan(e) - 900*a*b^2*c^3*f*x*tan(f*x)*tan(e) -
2700*a^2*b*c^2*d*f*x*tan(f*x)*tan(e) + 900*b^3*c^2*d*f*x*tan(f*x)*tan(e) - 900*a^3*c*d^2*f*x*tan(f*x)*tan(e) +
 2700*a*b^2*c*d^2*f*x*tan(f*x)*tan(e) + 900*a^2*b*d^3*f*x*tan(f*x)*tan(e) - 300*b^3*d^3*f*x*tan(f*x)*tan(e) +
90*b^3*c^3*tan(f*x)^3*tan(e) + 810*a*b^2*c^2*d*tan(f*x)^3*tan(e) + 810*a^2*b*c*d^2*tan(f*x)^3*tan(e) - 450*b^3
*c*d^2*tan(f*x)^3*tan(e) + 90*a^3*d^3*tan(f*x)^3*tan(e) - 450*a*b^2*d^3*tan(f*x)^3*tan(e) - 120*b^3*c^3*tan(f*
x)^2*tan(e)^2 - 1080*a*b^2*c^2*d*tan(f*x)^2*tan(e)^2 - 1080*a^2*b*c*d^2*tan(f*x)^2*tan(e)^2 + 540*b^3*c*d^2*ta
n(f*x)^2*tan(e)^2 - 120*a^3*d^3*tan(f*x)^2*tan(e)^2 + 540*a*b^2*d^3*tan(f*x)^2*tan(e)^2 + 90*b^3*c^3*tan(f*x)*
tan(e)^3 + 810*a*b^2*c^2*d*tan(f*x)*tan(e)^3 + 810*a^2*b*c*d^2*tan(f*x)*tan(e)^3 - 450*b^3*c*d^2*tan(f*x)*tan(
e)^3 + 90*a^3*d^3*tan(f*x)*tan(e)^3 - 450*a*b^2*d^3*tan(f*x)*tan(e)^3 - 45*b^3*c*d^2*tan(e)^4 - 45*a*b^2*d^3*t
an(e)^4 - 60*b^3*c^2*d*tan(f*x)^3 - 180*a*b^2*c*d^2*tan(f*x)^3 - 60*a^2*b*d^3*tan(f*x)^3 + 20*b^3*d^3*tan(f*x)
^3 - 450*a^2*b*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan
(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 150*b^3*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*
tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) - 450*a^3*c^2*d
*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*
x)*tan(e) + 1))*tan(f*x)*tan(e) + 1350*a*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*ta
n(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 1350*a^2*b*c*d^2*log(4*(ta
n(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e)
+ 1))*tan(f*x)*tan(e) - 450*b^3*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*
x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 150*a^3*d^3*log(4*(tan(e)^2 + 1)/(tan(f
*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan
(e) - 450*a*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + ta
n(f*x)^2 - 2*tan(f*x)*tan(e) + 1))*tan(f*x)*tan(e) + 720*a*b^2*c^3*tan(f*x)^2*tan(e) + 2160*a^2*b*c^2*d*tan(f*
x)^2*tan(e) - 900*b^3*c^2*d*tan(f*x)^2*tan(e) + 720*a^3*c*d^2*tan(f*x)^2*tan(e) - 2700*a*b^2*c*d^2*tan(f*x)^2*
tan(e) - 900*a^2*b*d^3*tan(f*x)^2*tan(e) + 300*b^3*d^3*tan(f*x)^2*tan(e) + 720*a*b^2*c^3*tan(f*x)*tan(e)^2 + 2
160*a^2*b*c^2*d*tan(f*x)*tan(e)^2 - 900*b^3*c^2*d*tan(f*x)*tan(e)^2 + 720*a^3*c*d^2*tan(f*x)*tan(e)^2 - 2700*a
*b^2*c*d^2*tan(f*x)*tan(e)^2 - 900*a^2*b*d^3*tan(f*x)*tan(e)^2 + 300*b^3*d^3*tan(f*x)*tan(e)^2 - 60*b^3*c^2*d*
tan(e)^3 - 180*a*b^2*c*d^2*tan(e)^3 - 60*a^2*b*d^3*tan(e)^3 + 20*b^3*d^3*tan(e)^3 - 60*a^3*c^3*f*x + 180*a*b^2
*c^3*f*x + 540*a^2*b*c^2*d*f*x - 180*b^3*c^2*d*f*x + 180*a^3*c*d^2*f*x - 540*a*b^2*c*d^2*f*x - 180*a^2*b*d^3*f
*x + 60*b^3*d^3*f*x - 30*b^3*c^3*tan(f*x)^2 - 270*a*b^2*c^2*d*tan(f*x)^2 - 270*a^2*b*c*d^2*tan(f*x)^2 + 90*b^3
*c*d^2*tan(f*x)^2 - 30*a^3*d^3*tan(f*x)^2 + 90*a*b^2*d^3*tan(f*x)^2 + 90*b^3*c^3*tan(f*x)*tan(e) + 810*a*b^2*c
^2*d*tan(f*x)*tan(e) + 810*a^2*b*c*d^2*tan(f*x)*tan(e) - 495*b^3*c*d^2*tan(f*x)*tan(e) + 90*a^3*d^3*tan(f*x)*t
an(e) - 495*a*b^2*d^3*tan(f*x)*tan(e) - 30*b^3*c^3*tan(e)^2 - 270*a*b^2*c^2*d*tan(e)^2 - 270*a^2*b*c*d^2*tan(e
)^2 + 90*b^3*c*d^2*tan(e)^2 - 30*a^3*d^3*tan(e)^2 + 90*a*b^2*d^3*tan(e)^2 + 90*a^2*b*c^3*log(4*(tan(e)^2 + 1)/
(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 30*b
^3*c^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*
tan(f*x)*tan(e) + 1)) + 90*a^3*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x
)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 270*a*b^2*c^2*d*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^
2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 270*a^2*b*c*d^2*log(4*(
tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e
) + 1)) + 90*b^3*c*d^2*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 +
 tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 30*a^3*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x)^4*tan(e)^2 - 2*tan(f*x)^3*ta
n(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) + 90*a*b^2*d^3*log(4*(tan(e)^2 + 1)/(tan(f*x
)^4*tan(e)^2 - 2*tan(f*x)^3*tan(e) + tan(f*x)^2*tan(e)^2 + tan(f*x)^2 - 2*tan(f*x)*tan(e) + 1)) - 180*a*b^2*c^
3*tan(f*x) - 540*a^2*b*c^2*d*tan(f*x) + 180*b^3*c^2*d*tan(f*x) - 180*a^3*c*d^2*tan(f*x) + 540*a*b^2*c*d^2*tan(
f*x) + 180*a^2*b*d^3*tan(f*x) - 60*b^3*d^3*tan(f*x) - 180*a*b^2*c^3*tan(e) - 540*a^2*b*c^2*d*tan(e) + 180*b^3*
c^2*d*tan(e) - 180*a^3*c*d^2*tan(e) + 540*a*b^2*c*d^2*tan(e) + 180*a^2*b*d^3*tan(e) - 60*b^3*d^3*tan(e) - 30*b
^3*c^3 - 270*a*b^2*c^2*d - 270*a^2*b*c*d^2 + 135*b^3*c*d^2 - 30*a^3*d^3 + 135*a*b^2*d^3)/(f*tan(f*x)^5*tan(e)^
5 - 5*f*tan(f*x)^4*tan(e)^4 + 10*f*tan(f*x)^3*tan(e)^3 - 10*f*tan(f*x)^2*tan(e)^2 + 5*f*tan(f*x)*tan(e) - f)